{extend name='extra@admin/content'}
{block name="button"}
{/block}
{block name="content"}
<!-- 表单搜索 开始 -->
<!-- <form class="layui-form layui-form-pane form-search" action="__SELF__" onsubmit="return false" method="get">
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">订单号</label>
        <div class="layui-input-inline">
            <input name="name" value="{$Think.get.name|default=''}" placeholder="请输入商品名称" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">下单时间</label>
        <div class="layui-input-inline">
            <input name="date" id='range-date' value="{$Think.get.date|default=''}"
                   placeholder="请选择下单时间" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>
</form> -->
<!-- 表单搜索 结束 -->
<form onsubmit="return false;" data-auto="true" method="post">
    {if empty($list)}
    <p class="help-block text-center well">没 有 记 录 哦！</p>
    {else}
    <input type="hidden" value="resort" name="action"/>
    <table class="layui-table" lay-skin="line" lay-size="sm" >
        <thead>
            <th class="text-center nowrap " colSpan="10">订单信息 - {if condition="$info.order_type eq 1"}线上订单{else /}线下订单{/if}</th>
            <tr>
                <th class='text-left nowrap'>订单ID</th>
                <th class='text-left nowrap'>订单编号</th>
                <th class='text-left nowrap'>下单人</th>
                <!--<th class='text-left nowrap'>E-Mail</th>-->
                <th class='text-left nowrap'>联系电话</th>
                <th class='text-left nowrap'>订单金额</th>
                <th class='text-left nowrap'>订单状态</th>
                <th class='text-left nowrap'>下单时间</th>
                <th class='text-left nowrap'>支付方式</th>
                <th class='text-left nowrap'>支付时间</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td class='text-left nowrap'>
                    {$info.id}
                </td>
                <td class='text-left nowrap'>
                    {$info.order_sn}
                </td>
                <td class='text-left nowrap'>
                    {$info.realname}
                </td>
                <!--<td class='text-left nowrap'>-->
                    <!--{$info.email}-->
                <!--</td>-->
                <td class='text-left nowrap'>
                    {$info.mobile}
                </td>
                <td class='text-left nowrap'>
                    {$info.final_amount}
                </td>
                <td class='text-left nowrap'>
                    {if condition="$info.order_status eq 0"}未支付
                    {elseif condition="$info.order_status eq 1"}已支付
                    {elseif condition="$info.order_status eq 2"}已确认
                    {elseif condition="$info.order_status eq 3"}已发货
                    {elseif condition="$info.order_status eq 4"}已完成
                    {elseif condition="$info.order_status eq 5"}退货申请中
                    {elseif condition="$info.order_status eq 6"}退货已处理
                    {elseif condition="$info.order_status eq 7"}订单已完成
                    {elseif condition="$info.order_status eq 8"}交易已关闭
                    {/if}
                </td>
                <td class='text-left nowrap'>
                    {$info.addtime|date="Y-m-d H:i:s",###}
                </td>
                <td class='text-left nowrap'>
                    {if condition="$info.pay_type eq 1"}
                        支付宝
                    {elseif condition="$info.pay_type eq 2"}
                        微信支付
                    {elseif condition="$info.pay_type eq 3" /}
                        余额支付
                    {/if}
                </td>
                <td class='text-left nowrap'>
                    {$info.pay_time|date="Y-m-d H:i:s",###}
                </td>
            </tr>
        </tbody>
    </table><br/>
    <table class="layui-table" lay-skin="line" lay-size="sm">
        <thead>
            <th class="text-center nowrap " colSpan="10">费用信息&nbsp;&nbsp;&nbsp;&nbsp;<!-- {if auth("$classuri/discount")}<a data-modal='{:url("$classuri/discount")}?id={$info.id}' href="javascript:void(0)" title="价格调整"><i class="layui-icon layui-bg-blue" >&#xe642;</i> </a>{/if} --></th>
            <tr>
                <th class='text-left nowrap'>小计</th>
                <th class='text-left nowrap'>优惠券抵扣</th>
                <th class='text-left nowrap'>运费</th>
                <th class='text-left nowrap'>交易价</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <!--商品总价，未扣除优惠券-->
                <td class='text-left nowrap'>
                    ￥{$info.goods_price}
                </td>
                <!--优惠券价格-->
                <td class='text-left nowrap'>
                    ￥{$info.coupon_price}
                </td>
                <td class='text-left nowrap'>
                    ￥{$info.shipping_price}
                    <!--{if condition="$info.dis_type eq 1"}+￥{$info.discount}{elseif condition="$info.dis_type eq 2" /}-￥{$info.discount}{else /}无{/if}-->
                </td>
                <td class='text-left nowrap'>
                    ￥{$info.final_amount}
                </td>
            </tr>
        </tbody>
    </table><br/>
    <table class="layui-table" lay-skin="line" lay-size="sm">
        <thead>
            <th class="text-center nowrap " colSpan="10">商品信息</th>
            <tr>
                <th class='text-left nowrap'>商品</th>
                <th class='text-left nowrap'>商品规格</th>
                <th class='text-left nowrap'>购买数量</th>
                <!--<th class='text-left nowrap'>退货状态</th>-->
                <th class='text-left nowrap'>总价</th>
                <th class='text-left nowrap'>状态</th>
                <!--<th class='text-left nowrap'>操作</th>-->
            </tr>
        </thead>
        <tbody>
            {volist name='list' id='vo'}
            <tr>
                <td class='text-left nowrap'>
                    {$vo.name}
                </td>
                <td class='text-left nowrap'>
                    {$vo.spec_detail}
                </td>
                <td class='text-left nowrap'>
                    {$vo.goods_num}
                </td>
                <!--<td class='text-left nowrap'>-->
                <!--{if condition="$vo.tuihuo_sign eq 0"}-->
                <!--<span class="layui-badge layui-bg-blue">无</span>-->
                <!--{elseif condition="$vo.tuihuo_sign eq 1" /}-->
                <!--<span class="layui-badge">部分退货：{$vo.tuihuo_num}</span>-->
                <!--{elseif condition="$vo.tuihuo_sign eq 2" /}-->
                <!--<span class="layui-badge layui-bg-green">全部退货</span>-->
                <!--{elseif condition="($vo.is_tuihuo eq 1) and ($vo.th_deal_result eq 0)" /}-->
                <!--<span class="layui-badge">未处理</span>-->
                <!--{/if}-->
                <!--</td>-->
                <td class='text-left nowrap'>
                    {$vo.final_amount}
                </td>
                <td class='text-left nowrap'>
                    {if condition="$vo.status eq 0"}未支付
                    {elseif condition="$vo.status eq 1"}已支付
                    {elseif condition="$vo.status eq 2"}已确认
                    {elseif condition="$vo.status eq 3"}已发货
                    {elseif condition="$vo.status eq 4"}已收货
                    {elseif condition="$vo.status eq 5"}退货申请中
                    {elseif condition="$vo.status eq 6"}退货已处理
                    {elseif condition="$vo.status eq 7"}订单已完成
                    {elseif condition="$vo.status eq 8"}交易已关闭
                    {/if}
                </td>
                <!--<td class='text-left nowrap'>-->
                    <!--{if auth("$classuri/back") and ($vo.tuihuo_sign neq 0)}-->
                    <!--<span class="text-explode">|</span>-->
                    <!--<a data-modal='{:url("$classuri/back")}?id={$vo.id}' href="javascript:void(0)">退货原因</a>-->
                    <!--{/if}-->
                <!--</td>-->
            </tr>
            {/volist}
        </tbody>
    </table><br/>
    {if condition="$info.order_type eq 1"}
    <table class="layui-table" lay-skin="line" lay-size="sm">
        <thead>
            <th class="text-center nowrap " colSpan="10">发货信息</th>
            <tr>
                <th class='text-left nowrap'>收货人</th>
                <th class='text-left nowrap'>联系电话</th>
                <th class='text-left nowrap'>收货地址</th>
                <!--<th class='text-left nowrap'>邮编</th>-->
                <th class='text-left nowrap'>配送方式</th>
                <!--<th class='text-left nowrap'>发货时间</th>-->
                <!--<th class='text-left nowrap'>收货时间</th>-->
            </tr>
        </thead>
        <tbody>
            <tr>
                <td class='text-left nowrap'>
                    {$info.consignee}
                </td>
                <td class='text-left nowrap'>
                    {$info.mobile}
                </td>
                <td class='text-left nowrap'>
                    {$info.address}
                </td>
                <!--<td class='text-left nowrap'>-->
                    <!--{$info.zipcode}-->
                <!--</td>-->
                <td class='text-left nowrap'>
                    {if condition="$info.order_type eq 1"}
                        达达配送
                    {else /}
                        线下自取
                    {/if}
                </td>
                <!--<td class='text-left nowrap'>-->
                    <!--无-->
                <!--</td>-->
                <!--<td class='text-left nowrap'>-->
                    <!--无-->
                <!--</td>-->
            </tr>
        </tbody>
    </table><br/>
    {/if}
    <table class="layui-table" lay-skin="line" lay-size="sm">
        <thead>
            <th class="text-center nowrap " colSpan="10">操作记录</th>
            <tr>
                <th class='text-left nowrap'>时间</th>
                <th class='text-left nowrap'>描述</th>
                <th class='text-left nowrap'>操作者</th>
            </tr>
        </thead>
        <tbody>
            {volist name='action' id='va'}
            <tr>
                <td class='text-left nowrap'>
                    {$va.addtime|date="Y-m-d H:i:s",###}
                </td>
                <td class='text-left nowrap'>
                    {$va.status_desc}
                </td>
                <td class='text-left nowrap'>
                    {if condition="$va.username eq ''"}会员{else /}{$va.username}{/if}
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
    {if isset($page)}<p>{$page}</p>{/if}
    {/if}
    <script>
        window.laydate.render({range: true, elem: '#range-date', format: 'yyyy/MM/dd'});
    </script>
</form>
{/block}